include:
  - memcached.install
memcached-user-group:
  group.present:
    - name: memcached
    - gid: 1120
  user.present:
    - name: memcached
    - fullname: memcached
    - shell: /sbin/nologin
    - uid: 1120
    - gid: 1120
/etc/sysconfig/memcached:
  file.managed:
    - source: salt://memcached/files/memcached
    - user: root
    - group: root
    - mode: 644
memcached-service:
  file.managed:
    - name: /usr/lib/systemd/system/memcached.service
    - source: salt://memcached/files/memcached.service
    - user: root
    - group: root
    - mode: 644
  service.running:
    - name: memcached
    - enable: True
    - require:
      - file: memcached-service
      - user: memcached-user-group
    - watch:
      - file: /etc/sysconfig/memcached 
